<?php

namespace IDock\Insurance\TPBX\Request;

use Exception;
use IDock\Insurance\TPBX\Request\AllTPBXRequest;
use IDock\Insurance\TPBX\Response\RenewalInquiryResponse;
use IDock\Visitor\RenewalInquiryVisitor;

class RenewalInquiryRequest extends AllTPBXRequest
{
    public $route = 'webapi/v1/renewal/query';

    protected $response = RenewalInquiryResponse::class;

    protected $urlTip = '续保查询';

    /*** @var  RenewalInquiryVisitor $visitor */
    protected $visitor;

    /**
     * @return array
     * @throws Exception
     */
    public function generate(): array
    {
        return [
            'basePart' => [
                'vin' => $this->visitor->vin,
                'vehicleLicenseNo' => $this->visitor->licenseNo,
            ]
        ];
    }
}
